package Integrity;


public class Statement extends Result {
	
	Statement(String UserID, String ResultID,String BillingSiteID, StatementData extract) {
		
		super(UserID, ResultID, BillingSiteID, extract);
		statm_no = extract.get_scraped_statm_no();
		statm_month = extract.get_scraped_statm_month();
		acc_no= extract.get_scraped_acc_no();
		acc_holder=extract.get_scraped_acc_holder();
		t_due = extract.get_scraped_t_due();
		due_date= extract.get_scraped_due_date();
		op_bal = extract.get_scraped_op_bal();
		cl_bal=extract.get_scraped_cl_bal();
		pay_rec = extract.get_scraped_pay_rec();
		new_chrg = extract.get_scraped_new_chrg();
		ded = extract.get_scraped_ded();
		disc =extract.get_scraped_disc();
		vat_amount = extract.get_scraped_vat_amount();
	}
        
        
        public Statement(String UserID, String BillingSiteID, java.util.Date date, 
                String[] strings, double[] doubles)
        {
            super(UserID, BillingSiteID, date);
            statm_no = strings[0];
            statm_month = strings[1];
            acc_no=strings[2];
            acc_holder=strings[3];
            t_due = doubles[0];
            due_date=strings[4];
            op_bal = doubles[1];
            cl_bal = doubles[2];
            pay_rec = doubles[3];
            new_chrg = doubles[4];
            ded = doubles[5];
            disc = doubles[6];
            vat_amount = doubles[7];
        }
	
	
	public String get_statm_no() {
		return statm_no;
	}
	public String get_statm_month() {
		return statm_month;
	}
	public String get_acc_no() {
		return acc_no;
	}
	public String get_acc_holder() {
		return acc_holder;
	}
	
	public String get_due_date(){
		return due_date;
	}
	public double get_new_chrg(){
		return new_chrg;
	}
	public double get_pay_rec(){
		return pay_rec;
	}
	public double get_op_bal(){
		return op_bal;
	}
	public double get_vat_amount(){
		return vat_amount;
	}
	public double get_t_due(){
		return t_due;
	}
	public double get_ded(){
		return ded;
	}
	public double get_disc(){
		return disc;
	}
	public double get_cl_bal(){
		return cl_bal;
	}
	@Override public String toString() {
		StringBuilder resultToString = new StringBuilder();
		String NEW_LINE = System.getProperty("line.separator");
		resultToString.append(super.toString());
		resultToString.append(""+ NEW_LINE);
		resultToString.append("COMMON STATEMENT DATA "+ NEW_LINE);
		resultToString.append("statm_no: " + statm_no + NEW_LINE);
		resultToString.append("statm_month: " + statm_month + NEW_LINE);
		resultToString.append("acc_no: " + acc_no + NEW_LINE);
		resultToString.append("acc_holder: " + acc_holder + NEW_LINE);
		resultToString.append("due_date: " + due_date + NEW_LINE);
		resultToString.append("t_due: " + Double.toString(t_due) + NEW_LINE);
		resultToString.append("op_bal: " + Double.toString(op_bal) + NEW_LINE);
		resultToString.append("cl_bal: " + Double.toString(cl_bal) + NEW_LINE);
		resultToString.append("pay_rec: " + Double.toString(pay_rec) + NEW_LINE);
		resultToString.append("new_chrg: " + Double.toString(new_chrg) + NEW_LINE);
		resultToString.append("ded: " + Double.toString(ded) + NEW_LINE);
		resultToString.append("disc: " + Double.toString(disc) + NEW_LINE);
		resultToString.append("vat_amount: " + Double.toString(vat_amount) + NEW_LINE);
		return resultToString.toString();
	}
	
	private String statm_no ="";
	private String statm_month = "";
	private String acc_no="";
	private String acc_holder="";
	private double t_due;
	private String due_date="";
	private double op_bal;
	private double cl_bal;
	private double pay_rec;
	private double new_chrg;
	private double ded;
	private double disc;
	private double vat_amount;
}
